{% extends '@WebsiteBundle/layout/baselayout.html.twig' %}


{% block body_javascript %}
	{{ parent() }}
	{% if videoInfo %}
		{% if info['video']['type'] == 2 %}
			{# 录播 #}
			{% if info['video']['videoChannel'] == 1 %}
				{# 腾讯云 #}
				<script>
					var videoId = '{{ videoId }}';
var appId = '{{ appId }}';
var token = '{{ token }}';
				</script>
				{{ encore_entry_script_tags('website_learn_vod_tengxunyun') }}
			{% else %}
				{# 阿里云 #}
				<script>
					var videoId = "{{ videoId }}";
var palyAuth = "{{ palyAuth }}";
				</script>
				{{ encore_entry_script_tags('website_learn_vod_aliyun') }}
			{% endif %}
		{% else %}
			<script>
				var isOpen = {{ info['isOpen'] }};
if (! isOpen) {
var nowTimeY = {{ nowTimeY }};
var nowTimeM = {{ nowTimeM }};
var nowTimeD = {{ nowTimeD }};
var nowTimeH = {{ nowTimeH }};
var nowTimeI = {{ nowTimeI }};
var nowTimeS = {{ nowTimeS }};

var openTimeY = {{ openTimeY }};
var openTimeM = {{ openTimeM }};
var openTimeD = {{ openTimeD }};
var openTimeH = {{ openTimeH }};
var openTimeI = {{ openTimeI }};
var openTimeS = {{ openTimeS }};
}
			</script>
			{# 直播 #}
			{% if info['video']['videoChannel'] == 1 %}
				{# 腾讯云 #}
				<script>
					var chatsdkAppID = {{ sdkAppID }};
var chatuuid = '{{ uuid }}';
var chatsign = '{{ sign }}';
var chatgroupId = '{{ groupId }}';
var urls = {{ playUrl|raw }};
				</script>
				{{ encore_entry_script_tags('website_learn_live_tengxunyun') }}
			{% else %}
				{# 阿里云 #}
				<script>
					var chatsdkAppID = {{ sdkAppID }};
var chatuuid = '{{ uuid }}';
var chatsign = '{{ sign }}';
var chatgroupId = '{{ groupId }}';
var urls = '{{ playUrl|raw }}';
				</script>
				{{ encore_entry_script_tags('website_learn_live_aliyun') }}
			{% endif %}
		{% endif %}
	{% endif %}

{% endblock %}

{% block head_stylesheets %}
	{% if videoInfo %}
		{{ parent() }}

		{% if info['video']['type'] == 2 %}
			{# 录播 #}
			{% if info['video']['videoChannel'] == 1 %}
				{# 腾讯云 #}
				{{ encore_entry_link_tags('website_learn_vod_tengxunyun') }}
			{% else %}
				{# 阿里云 #}
		<link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.8.8/skins/default/aliplayer-min.css"/>
		<script type="text/javascript" charset="utf-8" src="https://g.alicdn.com/de/prismplayer/2.8.8/aliplayer-min.js"></script>
		{# <script src="https://g.alicdn.com/de/prismplayer/2.8.2/hls/aliplayer-vod-anti-min.js"></script> #}
				{{ encore_entry_link_tags('website_learn_vod_aliyun') }}
			{% endif %}
		{% else %}
			{# 直播 #}
			{% if info['video']['videoChannel'] == 1 %}
				{# 腾讯云 #}
				{{ encore_entry_link_tags('website_learn_live_tengxunyun') }}
			{% else %}
				{# 阿里云 #}
			<link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.8.8/skins/default/aliplayer-min.css"/>
		<script type="text/javascript" charset="utf-8" src="https://g.alicdn.com/de/prismplayer/2.8.8/aliplayer-min.js"></script>
		{# <script src="https://g.alicdn.com/de/prismplayer/2.8.2/hls/aliplayer-vod-anti-min.js"></script> #}
				{{ encore_entry_link_tags('website_learn_live_aliyun') }}
			{% endif %}
		{% endif %}
	{% endif %}

{% endblock %}

{% block body_main %}
	{{ parent() }}
	{% if videoInfo %}
		{% if info['video']['type'] == 2 %}
			{# 录播 #}
			{% if info['video']['videoChannel'] == 1 %}
				{# 腾讯云 #}
				{% include '@WebsiteBundle/learn/vodView/tengxunyun.html.twig' %}
			{% else %}
				{# 阿里云 #}
				{% include '@WebsiteBundle/learn/vodView/aliyun.html.twig' %}
			{% endif %}
		{% else %}
			{# 直播 #}
			{% if info['video']['videoChannel'] == 1 %}
				{# 腾讯云 #}
				{% include '@WebsiteBundle/learn/liveView/tengxunyun.html.twig' %}
			{% else %}
				{# 阿里云 #}
				{% include '@WebsiteBundle/learn/liveView/aliyun.html.twig' %}
			{% endif %}
		{% endif %}

	{% endif %}
{% endblock %}
